from base import By, webdriver, sleep

driver = webdriver.Chrome()
driver.get('https://sahitest.com/demo/selectTest.htm')

# 定位select下拉框标签
s1 = driver.find_element(By.ID, 's1')
# 定位select选项,点击
sleep(2)
s1.find_element(By.CSS_SELECTOR, '#s1 > option:nth-child(4)').click()

# sleep(3)
# driver.quit()

